﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using DacSanMienTayOBJ;

public partial class Proccess_ProccessGetListDistrictFollowProvince : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GetListDistrict();
    }
    private void GetListDistrict()
    {
        try
        {
            int provinceID = int.Parse(Request["idProvince"]);
            StringBuilder builder = new StringBuilder();
            builder.Append("<option value=\"0\" >Chọn quận/huyện</option>");
            List<District> listDis = DistrictBusiness.ListAllDistrictFollowProvince(provinceID, ConnectionType.AdminConnection);
            foreach (District dis in listDis)
            {
                builder.Append("<option value=\""+dis.DistrictID+"\" >"+dis.DistrictName+"</option>");
            }

            Response.Write(builder);
            Response.End();

        }
        catch
        {

        }
    }
}